package sdau.hjk.controller;


import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import sdau.hjk.entity.Covid19;
import sdau.hjk.service.Impl.Covid19DataService;

import java.util.List;

/**
 *@version 1.0
 *@author: huangjiakai
 *@create:2021−03-25 15:09
 *@className:sdau.hjk.controller.DataContorller
 *@description: TODO
 */
@Controller
@RequestMapping("/covid19Data")
public class Covid19DataController {
    @Autowired
    private Covid19DataService dataService;

    @RequestMapping("/findAll")
    @ResponseBody
    public List<Covid19> findAll(){
        return dataService.findAll();
    }

    @RequestMapping("/updateData")
    public void updateData(){
        dataService.updateData();
    }
}
